//
//  PPAlbumContentTableViewPictureAddCell.m
//  pickpic
//
//  Created by Jinxiao on 10/16/16.
//  Copyright © 2016 MicroDream. All rights reserved.
//

#import "PPAlbumContentTableViewPictureAddCell.h"

#define kEdgeInsets UIEdgeInsetsMake(0, 14, 0, 14)
#define kAddHeight 138

@interface PPAlbumContentTableViewPictureAddCell ()
@property (readwrite, nonatomic, strong) UIButton *addButton;
@end

@implementation PPAlbumContentTableViewPictureAddCell

- (void)awakeFromNib {
    [super awakeFromNib];

    self.selectionStyle = UITableViewCellSelectionStyleNone;

    _addButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_addButton setBackgroundImage:[[UIImage imageWithColor:[UIColor colorWithRGBHex:0xffdd17]] stretchableImageByCenter] forState:UIControlStateNormal];
    [_addButton setImage:[UIImage imageNamed:@"icon-add-white"] forState:UIControlStateNormal];
    [self addSubview:_addButton];
}


- (void)layoutSubviews {
    [super layoutSubviews];

    _addButton.frame = CGRectMake(kEdgeInsets.left, (self.height - kAddHeight)/2, self.width - kEdgeInsets.left - kEdgeInsets.right, kAddHeight);
}

@end
